package com.example.service;
//接收

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;

@Service
public class Receiver {

    @RabbitListener(queues = "helloQueue")
    @RabbitHandler
    private void process(String message){
        System.out.println("Received message: "+ message);
    }
}
